<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<style type="text/css">
    li:hover:not(.dropdown){
        background-color: #3b4552;
    }
</style>
<!--左侧导航-->
<aside class="layout-sidebar">

    <!-- logo -->
    <div id="logo" class="sidebar-header" style="background-color:  grey;border-radius: 30px">
        <a href="index.jsp"><img src="images/logo-sidebar.png" title="" alt="" /></a>
    </div>
    <div class="layout-sidebar-scroll" style="background-color: grey;border-radius: 30px">

        <nav class="sidebar-main">
            <ul class="nav nav-drawer" >
                <li class="nav-item active" > <a href="index.jsp"><i class="mdi mdi-home"></i> 后台首页</a> </li>

                    <%--只有管理员才能看到下面的菜单--%>
                <c:if test="${currentUser.rid==11}">
                    <li class="nav-item nav-item-has-subnav">
                        <a href="javascript:void(0)"><i class="mdi mdi-format-align-justify"></i>部门管理</a>
                        <ul class="nav nav-subnav">
                            <li> <a href="adddept.jsp">部门添加</a> </li>
                            <li> <a href="deptlist.action">部门列表</a> </li>
                        </ul>
                    </li>
                    <li class="nav-item nav-item-has-subnav">
                        <a href="javascript:void(0)"><i class="mdi mdi-format-align-justify"></i>角色管理</a>
                        <ul class="nav nav-subnav">
                            <li> <a href="addrole.jsp">角色添加</a> </li>
                            <li> <a href="rolelist.action">角色列表</a> </li>
                        </ul>
                    </li>

                    <li class="nav-item nav-item-has-subnav">
                        <a href="javascript:void(0)"><i class="mdi mdi-file-outline"></i>员工管理</a>
                        <ul class="nav nav-subnav">
                            <li> <a href="empregist.jsp">人员添加</a> </li>
                            <li> <a href="emplist.action">人员列表</a> </li>
                        </ul>
                    </li>
                    <li class="nav-item nav-item-has-subnav">
                        <a href="javascript:void(0)"><i class="mdi mdi-file-outline"></i>订单审批</a>
                        <ul class="nav nav-subnav">
                            <li> <a href="examinelist.action">订单审批</a> </li>
                        </ul>
                    </li>
                </c:if>
                <c:if test="${currentUser.rid==6||currentUser.rid==11}">
                <li class="nav-item nav-item-has-subnav">
                    <a href="javascript:void(0)"><i class="mdi mdi-file-outline"></i>商品管理</a>
                    <ul class="nav nav-subnav">
                        <li> <a href="commoditylist.action">商品列表</a> </li>
                        <li> <a href="commodityadd.action?type=1">商品添加</a> </li>
                    </ul>
                </li>
                </c:if>
                <c:if test="${currentUser.rid==5||currentUser.rid==11}">
                <li class="nav-item nav-item-has-subnav">
                    <a href="javascript:void(0)"><i class="mdi mdi-file-outline"></i>仓库管理</a>
                    <ul class="nav nav-subnav">
                        <li class="nav-item nav-item-has-subnav">
                            <a href="#"><i class="mdi mdi-palette"></i> 库存查看</a>
                            <ul class="nav nav-subnav">
                                <li><a href="limit.action?page=1">所有库存</a></li>
                                <li><a href="entrepotlist.action">仓库列表</a></li>
                                <c:forEach var="Entrepot" items="${Entrepots}">
                                    <li><a href="inventorylittle.action?entid=${Entrepot.entid}">${Entrepot.entname}</a></li>

                                </c:forEach>
                            </ul>
                        </li>
                        <li class="nav-item nav-item-has-subnav">
                            <a href="javascript:void(0)"><i class="mdi mdi-palette"></i> 进销存管理</a>
                            <ul class="nav nav-subnav">
                                <li><a href="entrylist.action">采购入库</a></li>
                                <li><a href="returnlist.action">退货出库</a></li>
                                <li><a href="dispatch.action">库存调度</a></li>
                            </ul>
                        </li>
                        <li class="nav-item nav-item-has-subnav">
                            <a href="addentrepot.jsp"><i class="mdi mdi-palette"></i> 添加仓库</a>
                        </li>
                    </ul>

                </li>
                </c:if>
                <c:if test="${currentUser.rid==7||currentUser.rid==11}">
                <li class="nav-item nav-item-has-subnav">
                    <a href="javascript:void(0)"><i class="mdi mdi-file-outline"></i>采购管理</a>
                    <ul class="nav nav-subnav">
                        <li> <a href="orderlist.action">订单列表</a> </li>
                        <li> <a href="reportformlist.action">报表列表</a> </li>
                    </ul>
                </c:if>
                <c:if test="${currentUser.rid==10||currentUser.rid==11}">
                <li class="nav-item nav-item-has-subnav">
                    <a href="javascript:void(0)"><i class="mdi mdi-file-outline"></i>售后服务</a>
                    <ul class="nav nav-subnav">
                        <li> <a href="evaluateadd.action">售后评价</a> </li>
                        <li> <a href="evaluatelist.action">售后追评</a> </li>
                        <li> <a href="orderbarter.action">退换货</a> </li>
                    </ul>
                </li>
                </c:if>

                <li class="nav-item nav-item-has-subnav">
                    <a href="javascript:void(0)"><i class="mdi mdi-file-outline"></i>个人信息</a>
                    <ul class="nav nav-subnav">
                        <li> <a href="empinfo.action?eid=${currentUser.eid}">个人信息展示</a> </li>
                        <li> <a href="empupdatepass.jsp">修改个人密码</a> </li>
                    </ul>
                </li>
            </ul>
        </nav>


    </div>

</aside>
<!--End 左侧导航-->

<!--头部信息-->
<header class="layout-header">
    <nav class="navbar navbar-default">
        <div class="topbar">
            <div class="topbar-left">
                <div class="aside-toggler">
                    <span class="toggler-bar"></span>
                    <span class="toggler-bar"></span>
                    <span class="toggler-bar"></span>
                </div>
                <span class="navbar-page-title"style="font-family: '楷体';color: #2b542c;font-size: 25px">欢迎登录小米ERP系统</span>

            </div>

            <ul class="topbar-right">
                <li class="dropdown dropdown-profile">
                    <a href="javascript:void(0)" data-toggle="dropdown">
                        <c:if test="${currentUser.eid==13}">
                            <img class="img-avatar img-avatar-48 m-r-10" src="images/users/zxh.webp" alt="${currentUser.ename}" />
                        </c:if>
                        <c:if test="${currentUser.eid==14}">
                            <img class="img-avatar img-avatar-48 m-r-10" src="images/users/lyb.webp" alt="${currentUser.ename}" />
                        </c:if>
                        <c:if test="${currentUser.eid==16}">
                            <img class="img-avatar img-avatar-48 m-r-10" src="images/users/kpqn.webp" alt="${currentUser.ename}" />
                        </c:if>
                        <c:if test="${currentUser.eid==19}">
                            <img class="img-avatar img-avatar-48 m-r-10" src="images/users/xiaoxi.webp" alt="${currentUser.ename}" />
                        </c:if>
                        <c:if test="${currentUser.eid==17}">
                            <img class="img-avatar img-avatar-48 m-r-10" src="images/users/ld.webp" alt="${currentUser.ename}" />
                        </c:if>
                        <span>${currentUser.ename} <span class="caret"></span></span>
                    </a>
                    <ul class="dropdown-menu dropdown-menu-right">
                        <li> <a href="empinfo.action?eid=${currentUser.eid}"><i class="mdi mdi-account"></i> 个人信息</a> </li>
                        <li> <a href="empupdatepass.jsp"><i class="mdi mdi-lock-outline"></i> 修改密码</a> </li>
                        <li> <a href="exit.action"><i class="mdi mdi-logout-variant"></i> 退出登录</a> </li>
                    </ul>

                <!--切换主题配色-->
            </ul>

        </div>
    </nav>
</header>
<!--End 头部信息-->